package com.glory.brepda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.entity.MaterielListEntity;

import java.util.List;

/**
 * FileName: PartListAdapter
 * Author: XJH
 * Date: 2020/6/2 17:22
 * Description:
 * History:
 */
public class PartListAdapter extends BaseQuickAdapter<MaterielListEntity.Materiel, BaseViewHolder> {

    public PartListAdapter(@Nullable List<MaterielListEntity.Materiel> data) {
        super(R.layout.item_bin_info_list,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MaterielListEntity.Materiel item) {
        helper.setText(R.id.list_tv1,String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.list_tv2,item.getMATERIALNAME());
        helper.setText(R.id.list_tv3,item.getMLOTID());
        helper.setText(R.id.list_tv4,item.getPARTNERLOTID());
        helper.setGone(R.id.list_tv4,true);
    }
}
